<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><meta name="color-scheme" content="light dark"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimal-ui">
<title>英语小组字体生成</title>
</head>
<body>
<h3>英语小组字体生成</h3>
<textarea id=input placeholder="输入待处理文本" style="width:90%;" rows="7" oninput=output.value=c(input.value)>
</textarea><br><br>
<textarea id=output style="width:90%;" rows="7" placeholder="生成结果" >
</textarea>
<script>
var ori="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("")
var target="𝑨𝑩𝑪𝑫𝑬𝑭𝑮𝑯𝑰𝑱𝑲𝑳𝑴𝑵𝑶𝑷𝑸𝑹𝑺𝑻𝑼𝑽𝑾𝑿𝒀𝒁𝒂𝒃𝒄𝒅𝒆𝒇𝒈𝒉𝒊𝒋𝒌𝒍𝒎𝒏𝒐𝒑𝒒𝒓𝒔𝒕𝒖𝒗𝒘𝒙𝒚𝒛".split("")
var targetArr=[]
var item=""
var i=-1
while(i<target.length-1){
i++;
item+=target[i]
if(i%2!=0){
targetArr.push(item)
item=""
}

}
console.log(targetArr)
var jsonBodyArr=[]
var i=-1
while(i<ori.length-1){
i++
jsonBodyArr.push('"'+ori[i]+'":"'+targetArr[i]+'"')
}
console.log(jsonBodyArr)
var json=eval("({"+jsonBodyArr+"})");

function c(input){
var output="";
var i=-1
while(i<input.length-1){
i++;
if(json[input.split("")[i]])
{
output+=json[input.split("")[i]]
} else {
output+=input.split("")[i]
}
}
console.log(output)
return output;
}
</script>
</body>
</html>